package com.itheima.mapper;

import com.itheima.pojo.OrderSetting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.time.LocalDate;
import java.util.List;
import java.util.Set;

@Mapper
public interface OrderSettingMapper {

    /**
     * 根据日期查询预约设置
     * @param orderDate
     * @return
     */
    @Select("select * from t_ordersetting where order_date = #{orderDate}")
    OrderSetting selectByDate(LocalDate orderDate);

    /**
     * 根据日期更新预约设置数据
     * @param orderSetting
     */
    @Update("update t_ordersetting set reservations = #{reservations} where order_date = #{orderDate}")
    void update(OrderSetting orderSetting);
}
